using System.Windows.Forms;

namespace ctsu.BaseForms
{
	public class FormReportBase : System.Windows.Forms.Form
	{
		public IFormReportBaseController Controller;

		private System.Windows.Forms.GroupBox gbxCriteria;
		public System.Windows.Forms.TextBox Count;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Button btnRun;
		private System.Windows.Forms.DataGrid dg;
		private System.Windows.Forms.Button btnExit;
		public System.Windows.Forms.Button btnPrint;
		private System.ComponentModel.Container components = null;

		public DataGrid Grid
		{
			get { return dg; }
		}

		public FormReportBase()
		{
			InitializeComponent();
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose(disposing);
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.gbxCriteria = new System.Windows.Forms.GroupBox();
			this.Count = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.btnRun = new System.Windows.Forms.Button();
			this.dg = new System.Windows.Forms.DataGrid();
			this.btnExit = new System.Windows.Forms.Button();
			this.btnPrint = new System.Windows.Forms.Button();
			this.gbxCriteria.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dg)).BeginInit();
			this.SuspendLayout();
			// 
			// gbxCriteria
			// 
			this.gbxCriteria.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
				| System.Windows.Forms.AnchorStyles.Right)));
			this.gbxCriteria.Controls.Add(this.Count);
			this.gbxCriteria.Controls.Add(this.label3);
			this.gbxCriteria.Controls.Add(this.btnRun);
			this.gbxCriteria.Location = new System.Drawing.Point(8, 0);
			this.gbxCriteria.Name = "gbxCriteria";
			this.gbxCriteria.Size = new System.Drawing.Size(640, 56);
			this.gbxCriteria.TabIndex = 3;
			this.gbxCriteria.TabStop = false;
			this.gbxCriteria.Text = "Criteria";
			// 
			// Count
			// 
			this.Count.Location = new System.Drawing.Point(144, 24);
			this.Count.Name = "Count";
			this.Count.ReadOnly = true;
			this.Count.Size = new System.Drawing.Size(48, 22);
			this.Count.TabIndex = 6;
			this.Count.Text = "";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(96, 24);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(48, 16);
			this.label3.TabIndex = 5;
			this.label3.Text = "Count:";
			// 
			// btnRun
			// 
			this.btnRun.Location = new System.Drawing.Point(8, 24);
			this.btnRun.Name = "btnRun";
			this.btnRun.TabIndex = 4;
			this.btnRun.Text = "Run";
			this.btnRun.Click += new System.EventHandler(this.btnRun_Click);
			// 
			// dg
			// 
			this.dg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
				| System.Windows.Forms.AnchorStyles.Left)
				| System.Windows.Forms.AnchorStyles.Right)));
			this.dg.DataMember = "";
			this.dg.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dg.Location = new System.Drawing.Point(0, 64);
			this.dg.Name = "dg";
			this.dg.Size = new System.Drawing.Size(656, 368);
			this.dg.TabIndex = 4;
			// 
			// btnExit
			// 
			this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnExit.Location = new System.Drawing.Point(264, 440);
			this.btnExit.Name = "btnExit";
			this.btnExit.TabIndex = 9;
			this.btnExit.Text = "Exit";
			this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
			// 
			// btnPrint
			// 
			this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
			this.btnPrint.Enabled = false;
			this.btnPrint.Location = new System.Drawing.Point(176, 440);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.TabIndex = 8;
			this.btnPrint.Text = "Print";
			this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
			// 
			// FormReportBase
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
			this.ClientSize = new System.Drawing.Size(656, 470);
			this.Controls.Add(this.btnExit);
			this.Controls.Add(this.btnPrint);
			this.Controls.Add(this.dg);
			this.Controls.Add(this.gbxCriteria);
			this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.Name = "FormReportBase";
			this.Text = "FormReportBase";
			this.gbxCriteria.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.dg)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private void btnRun_Click(object sender, System.EventArgs e)
		{
			Controller.Run(sender, e);
		}

		private void btnPrint_Click(object sender, System.EventArgs e)
		{
			Controller.Print(sender, e);
		}

		private void btnExit_Click(object sender, System.EventArgs e)
		{
			Controller.Exit(sender, e);
		}
	}
}
